package org.xxl.pathfinder 
{
	/**
	 * ...
	 * @author XXL
	 */
	public class MapTileModel implements IMapTileModel 
	{
		private var _map:Array;
		
		public function MapTileModel() 
		{
			
		}
		
		public function get map():Array 
		{
			return _map;
		}
		
		public function set map(value:Array):void 
		{
			_map = value;
		}
		
		/* INTERFACE org.xxl.pathfinder.IMapTileModel */
		
		public function isBlock(startX:int, startY:int, endX:int, endY:int):int 
		{
			var mapWidth:int = this._map.length;
			var mapHeight:int = this._map[0].length;
			if (endX < 0 || endX >= mapWidth || endY < 0 || endY >= mapHeight)
			{
				return 0;
			}
			return this._map[endX][endY];
		}
		
	}

}